﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<OnlineLibrary.Linq.tblRole>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Roles Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Manage Roles Page</h2>
    <table border="1">
        <tr>
        <td>
            Action
        </td>
        <td>
            Role ID
        </td>
         <td>
            Role Name
        </td>
         <td>
            Descriptions
        </td>
        </tr>
     <% foreach (var item in Model)
       { %> 
    
        <tr>        
        <td>
                <%: Html.ActionLink("Edit", "Edit", new { id=item.RoleId }) %> |
                <%: Html.ActionLink("Delete", "Delete", new { id = item.RoleId })%>
            </td>    
            <td>
                <%: item.RoleId%>
            </td>
            <td>
                <%: item.RoleName %>
            </td>
            <td>
                <%: item.Description %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%: Html.ActionLink("Create Role", "Create", "Role")%>
    </p>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="PlaceHolderNavigation" runat="server">
</asp:Content>
